package cn.com.spic.demo.po;

import static com.yonyou.iuap.baseservice.support.condition.Match.IN;
import static com.yonyou.iuap.baseservice.support.condition.Match.LIKE;
import static com.yonyou.iuap.baseservice.support.condition.Match.OTHER;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.yonyou.iuap.baseservice.entity.AuditTrail;
import com.yonyou.iuap.baseservice.entity.MainBusinessObjectCode;
import com.yonyou.iuap.baseservice.entity.annotation.Associative;
import com.yonyou.iuap.baseservice.entity.annotation.I18nEnumCode;
import com.yonyou.iuap.baseservice.support.condition.Condition;
import com.yonyou.iuap.ucf.dao.BasePO;

/**
 * @Description
 * @Author zhangxbk
 * @Date 2019-07-25
 */

@JsonIgnoreProperties(ignoreUnknown = true)
@Associative(fkName = "contractId")
@Table(name = "cpu_ct")
public class ContractPO extends BasePO implements AuditTrail, MainBusinessObjectCode {
    /**
     * 立项id
     */
    @Column(name = "project_id")
    private String projectId;

    /**
     * 合同标题
     */
    @Condition(match = LIKE)
    @Column(name = "subject")
    private String subject;

    /**
     * 合同编码
     */
    @Condition(match = LIKE)
    @Column(name = "billno")
    private String billNo;

    /**
     * 合同类型
     */
    @Condition
    @Column(name = "bill_type")
    @I18nEnumCode(metaEnumId = "3bbb0475-6840-485a-a1d9-454fd58bd78c", target = "billTypeEnumValue")
    private String billType;
    @Transient
    private String billTypeEnumValue;
    /**
     * 单据状态
     */
    @Condition
    @Column(name = "bill_status")
    @I18nEnumCode(metaEnumId = "49bd01d2-5167-4a67-b0fe-377e9b74c2ae", target = "billStatusEnumValue")
    private String billStatus = "1";
    @Transient
    private String billStatusEnumValue;
    /**
     * 修改人
     */
    @Column(name = "last_modify_user")
    private String lastModifyUser;

    /**
     * 修改时间
     */
    @Column(name = "last_modified")
    private String lastModified;

    /**
     * 创建人
     */
    @Column(name = "create_user")
    private String createUser;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private String createTime;

    /**
     * 无税金额
     */
    @Column(name = "money")
    private Double money;

    /**
     * 含税金额
     */
    @Condition(match = OTHER)
    @Column(name = "tax_money")
    private Double taxMoney;

    /**
     * 供应商的租户id
     */
    @Column(name = "sup_tenant_id")
    private String supTenantId;

    /**
     * 采购组织id
     */
    @Condition(match = IN)
    @Column(name = "org_id")
    private String orgId;

    /**
     * 采购组织名称
     */
    @Column(name = "org_name")
    private String orgName;

    /**
     * 采购员id
     */
    @Condition(match = IN)
    @Column(name = "pur_person_id")
    private String purPersonId;

    /**
     * 采购员姓名
     */
    @Column(name = "pur_person_name")
    private String purPersonName;

    /**
     * 采购员用户id
     */
    @Column(name = "pur_user_id")
    private String purUserId;

    /**
     * 用户名
     */
    @Column(name = "pur_user_name")
    private String purUserName;

    /**
     * 备注
     */
    @Column(name = "memo")
    private String memo;

    /**
     * 合同签订日期
     */
    @Condition(match = OTHER)
    @Column(name = "subscribe_date")
    private String subscribeDate;

    /**
     * 总数量
     */
    @Column(name = "total_num")
    private Double totalNum;

    /**
     * 拒绝/变更的理由
     */
    @Column(name = "reason")
    private String reason;

    /**
     * 选择报价模式下的部分预付，预付比例字段必填
     */
    @Column(name = "advance_ratio")
    private Double advanceRatio;

    /**
     * 全额预付总价
     */
    @Column(name = "total_full_money")
    private Double totalFullMoney;

    /**
     * 找钢网项目编码
     */
    @Column(name = "project_code")
    private String projectCode;

    /**
     * 找钢网项目名称
     */
    @Column(name = "project_name")
    private String projectName;

    /**
     * 找钢网项目id
     */
    @Column(name = "project_doc_id")
    private String projectDocId;

    /**
     * OA审批状态
     */
    @Column(name = "fbill_status")
    private String fbillStatus;

    /**
     * 付款协议
     */
    @Column(name = "pay_agreement")
    private String payAgreement;

    /**
     * 外部合同号
     */
    @Condition(match = LIKE)
    @Column(name = "outer_ct_billcode")
    private String outerCtBillcode;

    /**
     * 组织适用范围
     */
    @Column(name = "org_scope")
    private Integer orgScope;
    /**
     * 附件ID
     */
    @Column(name = "attachment_id")
    private String attachmentId;
    /**
     * 流程实例id
     */
    @Column(name = "process_inst_id")
    private String processInstId;

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getBillNo() {
        return billNo;
    }

    public void setBillNo(String billno) {
        this.billNo = billno;
    }

    public String getBillType() {
        return billType;
    }

    public void setBillType(String billType) {
        this.billType = billType;
    }

    public String getBillStatus() {
        return billStatus;
    }

    public void setBillStatus(String billStatus) {
        this.billStatus = billStatus;
    }

    @Override
    public String getLastModifyUser() {
        return lastModifyUser;
    }

    @Override
    public void setLastModifyUser(String lastModifyUser) {
        this.lastModifyUser = lastModifyUser;
    }

    @Override
    public String getLastModified() {
        return lastModified;
    }

    public void setLastModified(String lastModified) {
        this.lastModified = lastModified;
    }

    @Override
    public String getCreateUser() {
        return createUser;
    }

    @Override
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Override
    public String getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public Double getTaxMoney() {
        return taxMoney;
    }

    public void setTaxMoney(Double taxMoney) {
        this.taxMoney = taxMoney;
    }

    public String getSupTenantId() {
        return supTenantId;
    }

    public void setSupTenantId(String supTenantId) {
        this.supTenantId = supTenantId;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getPurPersonId() {
        return purPersonId;
    }

    public void setPurPersonId(String purPersonId) {
        this.purPersonId = purPersonId;
    }

    public String getPurPersonName() {
        return purPersonName;
    }

    public void setPurPersonName(String purPersonName) {
        this.purPersonName = purPersonName;
    }

    public String getPurUserId() {
        return purUserId;
    }

    public void setPurUserId(String purUserId) {
        this.purUserId = purUserId;
    }

    public String getPurUserName() {
        return purUserName;
    }

    public void setPurUserName(String purUserName) {
        this.purUserName = purUserName;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getSubscribeDate() {
        return subscribeDate;
    }

    public void setSubscribeDate(String subscribeDate) {
        this.subscribeDate = subscribeDate;
    }

    public Double getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(Double totalNum) {
        this.totalNum = totalNum;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public Double getAdvanceRatio() {
        return advanceRatio;
    }

    public void setAdvanceRatio(Double advanceRatio) {
        this.advanceRatio = advanceRatio;
    }

    public Double getTotalFullMoney() {
        return totalFullMoney;
    }

    public void setTotalFullMoney(Double totalFullMoney) {
        this.totalFullMoney = totalFullMoney;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectDocId() {
        return projectDocId;
    }

    public void setProjectDocId(String projectDocId) {
        this.projectDocId = projectDocId;
    }

    public String getFbillStatus() {
        return fbillStatus;
    }

    public void setFbillStatus(String fbillStatus) {
        this.fbillStatus = fbillStatus;
    }

    public String getPayAgreement() {
        return payAgreement;
    }

    public void setPayAgreement(String payAgreement) {
        this.payAgreement = payAgreement;
    }

    public String getOuterCtBillcode() {
        return outerCtBillcode;
    }

    public void setOuterCtBillcode(String outerCtBillcode) {
        this.outerCtBillcode = outerCtBillcode;
    }

    public Integer getOrgScope() {
        return orgScope;
    }

    public void setOrgScope(Integer orgScope) {
        this.orgScope = orgScope;
    }

    public String getBillTypeEnumValue() {
        return billTypeEnumValue;
    }

    public void setBillTypeEnumValue(String billTypeEnumValue) {
        this.billTypeEnumValue = billTypeEnumValue;
    }

    public String getBillStatusEnumValue() {
        return billStatusEnumValue;
    }

    public void setBillStatusEnumValue(String billStatusEnumValue) {
        this.billStatusEnumValue = billStatusEnumValue;
    }

    public String getAttachmentId() {
        return attachmentId;
    }

    public void setAttachmentId(String attachmentId) {
        this.attachmentId = attachmentId;
    }

    @Override
    public String getMainBoCode() {
        return this.getClass().getSimpleName().replace("PO", "");
    }
}
